import { useState } from 'react';
import QuestionCard from '../../components/QuestionCard';
import { useTitle } from 'ahooks';
import styles from './List.module.scss';
import ListSearch from '../../components/ListSearch';
import { Typography, Empty } from 'antd';
const { Title } = Typography;
const Star = () => {
	useTitle('星标✌️');
	const [question, setQuestion] = useState([
		{
			_id: 'q1',
			title: '问卷1',
			isPublished: true,
			isStart: true,
			answerCount: 3,
			createdAt: '2025-11-09 23:53:32',
		},
		{
			_id: 'q2',
			title: '问卷2',
			isPublished: true,
			isStart: true,
			answerCount: 3,
			createdAt: '2025-11-10 23:53:32',
		},
	]);
	return (
		<>
			<div className={styles.header}>
				<Title level={3}>星标问卷</Title>
				<div className={styles.right}>
					<ListSearch />
				</div>
			</div>
			<div className={styles.content}>
				{question.length ? (
					question.map(item => {
						return <QuestionCard key={item._id} {...item} />;
					})
				) : (
					<Empty description="暂无数据"></Empty>
				)}
				{}
			</div>
			{question.length && <div className={styles.footer}>分页</div>}
		</>
	);
};

export default Star;
